package be.ipl.streams.daoimpl;

import javax.ejb.Stateless;

import be.ipl.streams.dao.PlayerDao;
import be.ipl.streams.domaine.Player;

@Stateless
public class PlayerDaoImpl extends DaoImpl<Player> implements PlayerDao {

	@Override
	public Player search(String name) {
		String queryString = "select p from Players p where p.login = ?1";
		return recherche(queryString, name);
	}

	@Override
	public Player search(String name, String password) {
		String queryString = "select p from Players p where p.login = ?1 AND p.password = ?2";
		return recherche(queryString, name, password);
	}
	
}
